package com.example.myapplication.view.slide;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.FrameLayout;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
 * 直播间滑动推荐
 *
 * @author zijian.cheng
 * @date 2020/3/6
 */
public class SlideSlipLayout extends FrameLayout  {


    public SlideSlipLayout(@NonNull Context context) {
        this(context, null);
    }

    public SlideSlipLayout(@NonNull Context context, @Nullable AttributeSet attrs) {
        this(context, attrs, 0);
    }
    public SlideSlipLayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onVisibilityChanged(@NonNull View changedView, int visibility) {
        super.onVisibilityChanged(changedView, visibility);
        if (hasWindowFocus() && visibility == View.VISIBLE) {
            //当侧边栏滑动出来之后请求数据
        } else {

        }
    }

    @Override
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
    }

}
